1. Field of the Invention
The present invention relates to an interface device for a printer, to a control method for said interface device, and to a data storage medium for recording said control method. More specifically, the present invention relates to a printer interface device that is installed to an expansion slot of the printer and connected to a host computer for monitoring the buffering status of the printer while receiving command data sent from the host computer, appropriately buffering the received command data, and forwarding the command data to the printer. The present invention further relates to a control method for said interface device, and to a data storage medium for recording said control method.
2. Description of the Related Art
Various interfaces for connecting a printer and a host computer have been proposed and are currently in use. Some common interfaces use the host computer""s parallel port or RS-232 port, or an IEEE (Institute of Electrical and Electronic Engineers) 1284 port. Other more recent interfaces use the USB (Universal Serial Bus) standard or a communications network to which the host computer is connected.
Command data sent by the host computer through such an interface to a printer is a byte stream expressing print commands instructing the printer to perform a process for printing some text or graphic data, and commands for processes controlling the printer.
While shape and design of the connector typically vary according to the interface standard, it is desirable for the printer hardware to be the same even if the method of connecting to the host computer changes. More specifically, while users may replace the host computer, they commonly want to continue using the same printer.
This problem is addressed in part by using an interface device to receive data and commands sent in a format conforming to the specific type of connector, perform such tasks as voltage conversion, impedance matching, buffering, interpreting, and filtering the received data and commands, and finally converting to and outputting the data and commands in the, e.g., RS-232 or other specific port format of the printer.
This makes it possible to use a single printer in a variety of situations by simply replacing the interface device. More specifically, a single basic printer can be supplied for use with various interface standards by varying the interface device used with a particular printer. It is therefore possible to mass produce the printer, and thereby reduce the overall cost of the printer.
Command data is buffered as described below by conventional interface devices. That is, when the host computer sends command data to the interface device, the interface device sends the received command data to the printer in the sequence received. The printer then stores the command data in a receive buffer. The printer notifies the host computer when the receive buffer of the printer becomes full by sending an appropriate signal to the host computer via a busy signal bus or by using an Auto Status Back (ASB) function as taught in Japanese Unexamined Patent Application (kokai) 7-137358. When the host computer is thus notified that the printer""s receive buffer is full, it stops sending print data.
There is, however, great demand for further improving the processing speed of the host computer and the printing speed of the printer without changing the printer itself by using the interface device built in to the printer to appropriately buffer data.
Furthermore, when the printer is compatible with real-time commands such as taught in Japanese Unexamined Patent Application (kokai) 10-333856 and the interface device receives a real-time command, the ability to respond to on-demand data requests from the host computer and not simply store the real-time command to a buffer is required.
Therefore, it is an object of the present invention to overcome the aforementioned problems.
Our invention solves this problem by providing a printer interface device that can be installed to an expansion slot of the printer and connected to a host computer for monitoring the buffering status of the printer while receiving command data sent from the host computer, appropriately buffering the received command data, and forwarding the command data to the printer. Our invention further provides a control method for theinterface device, and a data storage medium for recording the control method.
Our invention further relates to a printer interface device that, when there is command data that should be transferred to the printer with priority over data received by the interface device, reliably transfers such command data to the printer and buffers the received data according to the properties of the command data from the host computer. We also provide a control method for this interface device, and a data storage medium for recording the control method.
To achieve the above object, an interface device according to the present invention is described below in accordance with the principles of the invention. An interface device according to the present invention can be installed to an expansion slot of a printer, and comprises (a) a receiver for receiving data sent by a host computer connected to the interface device; (b) a transmitter for sending this data to a printer in which the interface device is installed; (c) a detector for detecting whether the printer can receive the data; and (d) a real-time command transmission controller for controlling the transmitter to send data received by the receiver when the data is a real-time command even if the detector detects that the printer cannot receive data.
According to the present invention, the interface device interprets real-time commands and sends them to the printer even when the printer cannot receive data because, for example, the printer""s receive buffer is full or the printer is off line because the cover is open. When a normal command, that is, a command other than a real-time command or similar priority command, is received, and the printer cannot receive the command data, the interface device enables the received data to be stored in internal memory.
An interface device according to the present invention can be installed to an expansion slot of a printer, and comprises a receiver, transmitter, detector, memory, and a controller.
The receiver receives data sent from the host computer to which the interface device is connected.
The transmitter sends data to the printer through the expansion slot in which the interface device is installed.
The detector detects whether the printer can receive data.
The memory stores data received by the receiver when the detector detects that the printer cannot receive data.
When the detector detects that the printer can receive data, the controller controls the transmitter to send data stored to memory and then send data received by the receiver after it detects that the printer can receive data.
An interface device according to the present invention can further comprise a discriminator and a notifying means.
The discriminator in this case detects if further data can be stored to memory.
The notifying means notifies the host computer when the discriminator detects that further data cannot be stored.
The transmitter of an interface device according to the present invention can have a connector conforming to the RS-232 standard.
An interface device according to the present invention can also be configured to a size that will fit within the printer housing when it is installed to an expansion slot of the printer.
An interface device according to the present invention further preferably comprises a real-time command transmission controller.
This real-time command transmission controller controls the transmitter to send data received by the receiver when the data is a real-time command when the detector detects that the printer cannot receive data.
This interface device according to the present invention can also be designed so that when the real-time command transmission controller controls the transmitter to send real-time command data to the printer, the data is not stored in memory.
Yet further, an interface device according to the present invention can be designed so that when data sent by the transmitter is interrupted and is in the middle of a data sequence for another command, the real-time command transmission controller controls the transmitter to send real-time command data after completing transmission of this data sequence for another command.
It is therefore possible to prevent real-time command data from interrupting transmission of another command data sequence. This configuration of an interface device according to the present invention thus detects whether a command is currently being transmitted, and delays transmission of real-time command data until it is not in the middle of a command transmission, that is, until there is a break between commands.
A control method for an interface device that can be installed to an expansion slot of a printer comprises a receiving step, a detecting step, a storage step, and a transmission step.
In this method, data sent by the host computer is received in the receiving step.
The detecting step detects whether the printer can receive data.
The storage step stores data received in the receiving step when the detecting step detects that the printer cannot receive data.
The transmission step sends data stored in the storage step to the printer, and then sends data received in the receiving step to the printer, when the detecting step detects that the printer can receive data.
A control method for an interface device according to the present invention further preferably comprises a discriminating step and a notifying step.
The discriminating step detects if further data can be stored to memory.
The notifying step notifies the host computer when the discriminating step detects that further data cannot be stored.
Additionally, a control method for an interface device according to the present invention comprises a real-time command transmission step.
The real-time command transmission step sends data received in the receiving step when the data is a real-time command and when the detecting step detects that the printer cannot receive data.
Further, the storage step for storing data is not performed in this interface device control method when real-time command data is sent to the printer in the real-time command transmission step.
According to the interface device control method of the present invention, the real-time command transmission step completes sending a data sequence for a command other than a real-time command, and then sends the real-time command data, when data sent to the printer is interrupted and is in the middle of a data sequence for another command.
A program for controlling an interface device according to the present invention can be stored to such computer-readable data storage media as a Compact Disc (CD), floppy disk, hard disk, magneto-optical disk, Digital Video Disc (DVD), and magnetic tape.
In addition, a program for controlling an interface device according to the present invention can be loaded into a server computer for the World Wide Web (WWW) so that users can download the program from the server, save the program to a local interface device to update the interface device control program so that the program according to the present invention is run by the interface device.
Other objects and attainments together with a fuller understanding of the invention will become apparent and appreciated by referring to the following description and claims taken in conjunction with the accompanying drawings.